package homework17;

public class Adapter implements CatTarget,DogAdaptee{
    private CatTarget catTarget;
    private DogAdaptee dogAdaptee;
    public Adapter(){

    }
    public void setCatTarget(CatTarget catTarget){
        this.catTarget = catTarget;
    }
    public void setDogAdaptee(DogAdaptee dogAdaptee ){
        this.dogAdaptee = dogAdaptee;
    }

    @Override
    public void cry() {
        System.out.println("猫学狗叫，..");
        dogAdaptee.cry();
    }

    @Override
    public void catMouse() {
        System.out.println("狗学猫抓老鼠...");
        catTarget.catMouse();
    }
}
